/******************************************************************************
 * @File name   :      MasterDataDealerInfo.java
 *
 * @Author      :      ANMA
 *
 * @Date        :      Jul 15, 2015
 *
 * @Copyright Notice: 
 * Copyright (c) 2014 DMS, Inc. All  Rights Reserved.
 * This software is published under the terms of the DMS Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * ----------------------------------------------------------------------------
 * Date                         Who         Version         Comments
 * Jul 15, 2015 7:41:52 PM    ANMA      1.0            Initial Version
 *****************************************************************************/
package com.cap.bts.crmdp.dealer.masterdata.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.cap.bts.framework.codemapping.domain.CodeInfo;
import com.cap.bts.framework.common.domain.BaseDomain;

/**
 * 
 */
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name="TM_RAW_DEALER")
@AttributeOverrides({
	@AttributeOverride(name="createDate", column=@Column(name="CREATE_DATE", nullable = false)),
	@AttributeOverride(name="createBy", column=@Column(name="CREATE_BY")),
    @AttributeOverride(name="lastUpdateBy", column=@Column(name="LAST_UPDATE_BY")),
    @AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_DATE"))
})
public class MasterDataDealerInfo extends BaseDomain implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8992485389224183898L;

	private Long id;
	private String dealerNum;
	private String dealerName;
	private String alias;
	private String zipCode;
	private String registeredAddress;
	private String owner;
	private String contact;
	private String dealerProgram;
	private String region;
	private String provinceName;
	private String cityName;
	private String county;
	private String regionCode;
	private String regionConsultantMgr;
	private String consultant;
	private String consultantPhone;
	private CodeInfo province;
	private CodeInfo city;
	private String address;
	private String contactName;
	private String consultantMail;
	private String contactPhone;
	private String telephone;
	private String dealerStatus;
	private int workstations;
	private String ifHq;
	private String ifBranch;
	private Long hqId;
	private Date programStartDate;
	private double longitude;
	private double latitude;
	private String businessHours;
	private int status;
	private String salesRepresentative;
	private String ifDirectPos;
	private Date lastOpreationPwdChangeTime;
	private String operationPassword;
	private String shopFrontPhoto;
	private String riskWaringLevel;
	private String ownerMobilePhone;
	private String ownerIdNumber;
	private String consultantNum;
	private String exitPlan;
	private String exitDealerTypeStatus;
	private String fullName;
	private String shortName;
	private Date exitDate;
    public MasterDataDealerInfo(){
        
    }

	public MasterDataDealerInfo(MasterDataDealerInfo dealerInfo) {
		this.id = dealerInfo.id;
		this.dealerNum = dealerInfo.dealerNum;
		this.dealerName = dealerInfo.dealerName;
		this.dealerProgram = dealerInfo.dealerProgram;
		this.region = dealerInfo.region;
		this.province = dealerInfo.province;
		this.city = dealerInfo.city;
		this.address = dealerInfo.address;
		this.contactName = dealerInfo.contactName;
		this.contactPhone = dealerInfo.contactPhone;
		this.dealerStatus = dealerInfo.dealerStatus;
	}
	
	/**
	 * @return the id
	 */
	@Id
//	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the dealerNum
	 */
	@Column(name="DEALER_NUM")
	public String getDealerNum() {
		return dealerNum;
	}
	/**
	 * @param dealerNum the dealerNum to set
	 */
	public void setDealerNum(String dealerNum) {
		this.dealerNum = dealerNum;
	}
	/**
	 * @return the dealerName
	 */
	@Column(name="DEALER_NAME")
	public String getDealerName() {
		return dealerName;
	}
	/**
	 * @param dealerName the dealerName to set
	 */
	public void setDealerName(String dealerName) {
		this.dealerName = dealerName;
	}
	/**
	 * @return the dealerProgram
	 */
	@Column(name="DEALER_PROGRAM")
	public String getDealerProgram() {
		return dealerProgram;
	}
	/**
	 * @param dealerProgram the dealerProgram to set
	 */
	public void setDealerProgram(String dealerProgram) {
		this.dealerProgram = dealerProgram;
	}
	/**
	 * @return the region
	 */
	@Column(name="REGION")
	public String getRegion() {
		return region;
	}
	/**
	 * @param region the region to set
	 */
	public void setRegion(String region) {
		this.region = region;
	}

	/**
	 * @return the province
	 */
    @ManyToOne(optional = false, targetEntity = CodeInfo.class,fetch = FetchType.LAZY)
    @JoinColumn(name = "province_id", referencedColumnName = "id")
	public CodeInfo getProvince() {
		return province;
	}
	/**
	 * @param province the province to set
	 */
	public void setProvince(CodeInfo province) {
		this.province = province;
	}
	/**
	 * @return the city
	 */
	@ManyToOne(optional = false, targetEntity = CodeInfo.class,fetch = FetchType.LAZY)
    @JoinColumn(name = "city_id", referencedColumnName = "id")
	public CodeInfo getCity() {
		return city;
	}
	/**
	 * @param city the city to set
	 */
	public void setCity(CodeInfo city) {
		this.city = city;
	}
	/**
	 * @return the address
	 */
	@Column(name="ADDRESS")
	public String getAddress() {
		return address;
	}
	/**
	 * @param address the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}
	/**
	 * @return the contactName
	 */
	@Column(name="CONTACT_NAME")
	public String getContactName() {
		return contactName;
	}
	/**
	 * @param contactName the contactName to set
	 */
	public void setContactName(String contactName) {
		this.contactName = contactName;
	}
	/**
	 * @return the contactPhone
	 */
	@Column(name="CONTACT_PHONE")
	public String getContactPhone() {
		return contactPhone;
	}
	/**
	 * @param contactPhone the contactPhone to set
	 */
	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}
	/**
	 * @return the dealerStatus
	 */
	@Column(name="DEALER_STATUS")
	public String getDealerStatus() {
		return dealerStatus;
	}
	/**
	 * @param dealerStatus the dealerStatus to set
	 */
	public void setDealerStatus(String dealerStatus) {
		this.dealerStatus = dealerStatus;
	}

    /**
     * @Date        :      2015年7月23日
     *
     * @return the lastOpreationPwdChangeTime
     */
	@Column(name="LAST_OPREATIONPWD_CHANGE_TIME")
    public Date getLastOpreationPwdChangeTime() {
        return lastOpreationPwdChangeTime;
    }

    /**
     * @Date        :      2015年7月23日
     *
     * @param lastOpreationPwdChangeTime the lastOpreationPwdChangeTime to set
     */
    public void setLastOpreationPwdChangeTime(Date lastOpreationPwdChangeTime) {
        this.lastOpreationPwdChangeTime = lastOpreationPwdChangeTime;
    }

    /**
     * @Date        :      2015年7月23日
     *
     * @return the operationPassword
     */
    @Column(name="OPERATION_PASSWORD")
    public String getOperationPassword() {
        return operationPassword;
    }

    /**
     * @Date        :      2015年7月23日
     *
     * @param operationPassword the operationPassword to set
     */
    public void setOperationPassword(String operationPassword) {
        this.operationPassword = operationPassword;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the zipCode
     */
    @Column(name="ZIPCODE")
    public String getZipCode() {
        return zipCode;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param zipCode the zipCode to set
     */
    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the registeredAddress
     */
    @Column(name="REGISTERED_ADDRESS")
    public String getRegisteredAddress() {
        return registeredAddress;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param registeredAddress the registeredAddress to set
     */
    public void setRegisteredAddress(String registeredAddress) {
        this.registeredAddress = registeredAddress;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the owner
     */
    @Column(name="OWNER")
    public String getOwner() {
        return owner;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param owner the owner to set
     */
    public void setOwner(String owner) {
        this.owner = owner;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the contact
     */
    @Column(name="CONTACT")
    public String getContact() {
        return contact;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param contact the contact to set
     */
    public void setContact(String contact) {
        this.contact = contact;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the provinceName
     */
    @Column(name="PROVINCE")
    public String getProvinceName() {
        return provinceName;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param provinceName the provinceName to set
     */
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the cityName
     */
    @Column(name="CITY")
    public String getCityName() {
        return cityName;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param cityName the cityName to set
     */
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the county
     */
    @Column(name="COUNTY")
    public String getCounty() {
        return county;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param county the county to set
     */
    public void setCounty(String county) {
        this.county = county;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the regionCode
     */
    @Column(name="REGION_CODE")
    public String getRegionCode() {
        return regionCode;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param regionCode the regionCode to set
     */
    public void setRegionCode(String regionCode) {
        this.regionCode = regionCode;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the regionConsultantMgr
     */
    @Column(name="REGION_CONSULTANT_MGR")
    public String getRegionConsultantMgr() {
        return regionConsultantMgr;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param regionConsultantMgr the regionConsultantMgr to set
     */
    public void setRegionConsultantMgr(String regionConsultantMgr) {
        this.regionConsultantMgr = regionConsultantMgr;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the consultant
     */
    @Column(name="CONSULTANT")
    public String getConsultant() {
        return consultant;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param consultant the consultant to set
     */
    public void setConsultant(String consultant) {
        this.consultant = consultant;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the consultantPhone
     */
    @Column(name="CONSULTANT_PHONE")
    public String getConsultantPhone() {
        return consultantPhone;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param consultantPhone the consultantPhone to set
     */
    public void setConsultantPhone(String consultantPhone) {
        this.consultantPhone = consultantPhone;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the telephone
     */
    @Column(name="TELEPHONE")
    public String getTelephone() {
        return telephone;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param telephone the telephone to set
     */
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the workstations
     */
    @Column(name="WORKSTATIONS")
    public int getWorkstations() {
        return workstations;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param workstations the workstations to set
     */
    public void setWorkstations(int workstations) {
        this.workstations = workstations;
    }

   

    /**
     * @Date        :      2015年11月2日
     *
     * @return the hqId
     */
    @Column(name="HQ_ID")
    public Long getHqId() {
        return hqId;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param hqId the hqId to set
     */
    public void setHqId(Long hqId) {
        this.hqId = hqId;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the programStartDate
     */
    @Column(name="PROGRAM_START_DATE")
    public Date getProgramStartDate() {
        return programStartDate;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param programStartDate the programStartDate to set
     */
    public void setProgramStartDate(Date programStartDate) {
        this.programStartDate = programStartDate;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the longitude
     */
    @Column(name="longitude")
    public double getLongitude() {
        return longitude;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param longitude the longitude to set
     */
    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the latitude
     */
    @Column(name="latitude")
    public double getLatitude() {
        return latitude;
    }

    @Column(name="IF_HQ")
    public String getIfHq() {
        return ifHq;
    }

    public void setIfHq(String ifHq) {
        this.ifHq = ifHq;
    }

    @Column(name="IF_BRANCH")
    public String getIfBranch() {
        return ifBranch;
    }

    public void setIfBranch(String ifBranch) {
        this.ifBranch = ifBranch;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param latitude the latitude to set
     */
    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the businessHours
     */
    @Column(name="business_hours")
    public String getBusinessHours() {
        return businessHours;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param businessHours the businessHours to set
     */
    public void setBusinessHours(String businessHours) {
        this.businessHours = businessHours;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the status
     */
    @Column(name="status")
    public int getStatus() {
        return status;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @return the consultantMail
     */
    @Column(name="CONSULTANT_MAIL")
    public String getConsultantMail() {
        return consultantMail;
    }

    /**
     * @Date        :      2015年11月2日
     *
     * @param consultantMail the consultantMail to set
     */
    public void setConsultantMail(String consultantMail) {
        this.consultantMail = consultantMail;
    }

    @Column(name="SALES_REPRESENTATIVE")
    public String getSalesRepresentative() {
        return salesRepresentative;
    }

    public void setSalesRepresentative(String salesRepresentative) {
        this.salesRepresentative = salesRepresentative;
    }

    @Column(name="IF_DIRECT_POS")
    public String getIfDirectPos() {
        return ifDirectPos;
    }

    public void setIfDirectPos(String ifDirectPos) {
        this.ifDirectPos = ifDirectPos;
    }
    @Column(name="shop_front_photo")
	public String getShopFrontPhoto() {
		return shopFrontPhoto;
	}

	public void setShopFrontPhoto(String shopFrontPhoto) {
		this.shopFrontPhoto = shopFrontPhoto;
	}
	@Column(name="risk_waring_level")
	public String getRiskWaringLevel() {
		return riskWaringLevel;
	}
	
	public void setRiskWaringLevel(String riskWaringLevel) {
		this.riskWaringLevel = riskWaringLevel;
	}
	@Column(name="owner_mobile_phone")
	public String getOwnerMobilePhone() {
		return ownerMobilePhone;
	}

	public void setOwnerMobilePhone(String ownerMobilePhone) {
		this.ownerMobilePhone = ownerMobilePhone;
	}
	@Column(name="owner_id_number")
	public String getOwnerIdNumber() {
		return ownerIdNumber;
	}

	public void setOwnerIdNumber(String ownerIdNumber) {
		this.ownerIdNumber = ownerIdNumber;
	}
	@Column(name="consultant_num")
	public String getConsultantNum() {
		return consultantNum;
	}

	public void setConsultantNum(String consultantNum) {
		this.consultantNum = consultantNum;
	}
	@Column(name="exit_plan")
	public String getExitPlan() {
		return exitPlan;
	}

	public void setExitPlan(String exitPlan) {
		this.exitPlan = exitPlan;
	}
	@Column(name="exit_dealer_type_status")
	public String getExitDealerTypeStatus() {
		return exitDealerTypeStatus;
	}

	public void setExitDealerTypeStatus(String exitDealerTypeStatus) {
		this.exitDealerTypeStatus = exitDealerTypeStatus;
	}
	
	@Column(name="ALIAS")
	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}
	@Column(name="full_name")
	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}
	@Column(name="short_name")
	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	@Column(name="exit_date")
	public Date getExitDate() {
		return exitDate;
	}

	public void setExitDate(Date exitDate) {
		this.exitDate = exitDate;
	}
	
	
}
